﻿using System.Collections.Generic;
using System.Reflection;
using JetBrains.Annotations;

namespace MugenInjection.Interception.Interface
{
    /// <summary>
    /// Represents the specific collection for <see cref="IProxy"/>s.
    /// </summary>
    public interface IProxyCollection : IList<IProxy>
    {
        /// <summary>
        /// Searches for an <see cref="IProxy"/> with the specified token.
        /// </summary>
        /// <param name="token">The specified token for search.</param>
        /// <returns>An instance of <see cref="IProxy"/>.</returns>
        IProxy Find(int token);

        /// <summary>
        /// Searches for an <see cref="IProxy"/> with the specified <see cref="MemberInfo"/>.
        /// </summary>
        /// <param name="memberInfo">The specified <see cref="MemberInfo"/> for search.</param>
        /// <returns>An instance of <see cref="IProxy"/>.</returns>
        IProxy Find(MemberInfo memberInfo);

        /// <summary>
        /// Creates a new object that is a copy of the current <see cref="IProxyCollection"/>.
        /// </summary>
        /// <returns>A new object that is a copy of this instance.</returns>
        IProxyCollection Clone();
    }
}